@import './variable.scss', './layout.scss', './util.scss', './component.scss';

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  word-wrap: break-word; // 解决长单词会溢出父元素
  -webkit-text-size-adjust: 100%; // 屏幕旋转字体大小保持一致
  -webkit-font-smoothing: antialiased; // 字体抗锯齿
  -webkit-overflow-scrolling: touch; // 让自定义滚动条拥有顺畅的滑动
  -webkit-tap-highlight-color: transparent; // 移动端点击不高亮
}

html,
body,
#app,
.van-config-provider {
  display: block;
  height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-size: var(--font-size);
  color: var(--color-white);
  line-height: 1.5;

  ul {
    list-style: none;
  }

  a {
    color: var(--color-primary);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  img {
    display: block;
    max-width: 100%;
    object-fit: cover;
  }

  input,
  textarea,
  button {
    font: inherit;
    line-height: inherit;
  }

  input {
    caret-color: var(--color-black);
  }

  .van-button {
    min-width: 120px;
    height: 40px;

    &--primary {
      border-color: #2d2d2e;
      background: linear-gradient(to bottom, #606af1, #4f82f2);
      border-radius: 12px;
    }

    &--plain {
      color: white !important;
      background: linear-gradient(to bottom, #9299f4, #82a8fa) !important;
    }
  }

  .van-nav-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: var(--max-width);
    height: 50px;
    transform: translateX(-50%);
    z-index: 20;
  }

  .van-tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: var(--max-width);
    transform: translateX(-50%);
    z-index: 20;
  }

  .van-search {
    padding: 0;
    background-color: transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 35px;

    &__content {
      background-color: rgba($color: black, $alpha: 0.2) !important;

      input {
        color: var(--color-black) !important;

        &::placeholder {
          color: var(--color-black) !important;
        }
      }

      .van-icon-search {
        color: var(--color-black) !important;
      }
    }
  }

  .van-popup {
    padding: 15px;
    color: white;
    background-color: rgba($color: black, $alpha: 0.5);
    border-radius: 8px;
    overflow: hidden;
  }
}
